import req from "../utils/http.js"

//轮播图
export function getCarousel(){
    return req.get(`api/weChat/applet/course/banner/list?number=5`)
}
//直播
export function LiveStreaming(){
    return req.post(`/api/pc/liveCourseInfo/list`)
}

// 根据课程类型获取列表（首页)
export function getCourseList(type){
    const parmt= new URLSearchParams
    parmt.append('type',type)
    parmt.append('pageNum',1)
    parmt.append('pageSize',6)
    return req.post(`/api/weChat/applet/course/list/type`,parmt)
}

//头条精选
export function getHeadlineSelection (){
    const parmt = {}
    return req.post(`/api/weChat/applet/article/list`,parmt)

}
// 分享页
export function getShareData(articleId){
    return req.get(`api/weChat/applet/article/detail/${articleId}`)
}

// 缓冲页
export function getBufferData(courseId){
    return req.get(`api/pc/course/detail/${courseId} `)
}